package com.itany.shop.service;

import com.itany.shop.entity.Item;
import com.itany.shop.exception.ProductNotExistException;
import com.itany.shop.exception.RequestParameterException;
import com.itany.shop.exception.UserNotExistException;
import com.itany.shop.vo.Cart;

/**
 * @author MissChen
 * @version 1.0
 * @date 2023 年12月22日 9:20
 */
public interface CartService {

    /**
     * 将指定商品添加到购物车中
     * @param cart
     * @param id
     */
    void addCart(Cart cart, Integer id) throws UserNotExistException, RequestParameterException, ProductNotExistException;



    /**
     * 删除指定购物车中的指定商品
     * @param cart
     * @param id
     */
    void removeCart(Cart cart,Integer id) throws UserNotExistException, RequestParameterException;

    void modifyCart(Cart cart,Integer id,Integer num) throws UserNotExistException, RequestParameterException;
}
